package com.example.springboot.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Menu {

    private Integer id;
    // 菜单名称
    private String menuName;
    // 父菜单id
    private Integer parentId;
    // 菜单url
    private String url;
    // 菜单图标
    private String icon;

    private Integer sort;

    private String permission;

    // 子菜单
    @TableField(exist = false)
    private List<Menu> childMenus;

    public Menu(Integer parentId, Integer id){
        this.id = id;
        this.parentId = parentId;
    }
}
